﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeFile="Company.aspx.cs"
    Inherits="Select_Company" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <script src="../Scripts/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
    <link href="../Styles/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
        function Choose(CompanyID, CompanyName) {
            parent.fn_CompanySet(CompanyID, CompanyName)
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <table>
        <tr>
            <td>
                名称：<NC:FTextBox ID="txtName" runat="server"></NC:FTextBox>
            </td>
            <td>
                <asp:Button ID="btnSearch" runat="server" Text="查询" CssClass="btn btn2" OnClick="btnSearch_Click" />
            </td>
        </tr>
    </table>
    <NC:FGridView ID="FGridView1" runat="server" AutoCreateNumber="true" ShowFooter="true"
        DataKeyNames="CompanyID" Width="98%">
        <Columns>
            <asp:BoundField DataField="CompanyName" HeaderText="名称" />
            <asp:BoundField DataField="LianXiR" HeaderText="联系人" />
            <asp:BoundField DataField="LianXiDH" HeaderText="联系方式" />
            <asp:BoundField DataField="DiZhi" HeaderText="地址" />
            <asp:HyperLinkField DataNavigateUrlFields="CompanyID" DataNavigateUrlFormatString="Company.aspx?ParentID={0}"
                HeaderText="分公司" Text="查看" ControlStyle-CssClass="Gridbtn">
                <ItemStyle Width="60px" HorizontalAlign="Center" />
            </asp:HyperLinkField>
            <asp:TemplateField HeaderText="操作" ItemStyle-HorizontalAlign="Center">
                <ItemTemplate>
                    <input type="button" value="选择" class="Gridbtn" onclick="Choose('<%# Eval("CompanyID") %>','<%# Eval("CompanyName") %>');">
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" Width="50px" />
            </asp:TemplateField>
        </Columns>
    </NC:FGridView>
    </form>
</body>
</html>
